<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="${pageContext.request.contextPath}/common/js/jquery-1.8.0.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/perJsUI/PageView.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/perJsUI/GridView.js"></script>
<title>Insert title here</title>
</head>
<body>
<div id="xixihaha"></div>
</body>
<script type="text/javascript">
var layout = {
	idField: 'userid',	
	singleSelect: true,
	frozenColumns:{
		fileld: 'check_userid',
		checkbox: true,
		boxFloat: 'left',
		boxStyle: 'checkbox'
	},
	columns:[{
			title: '用户名',
			field: 'name',
			align: 'center',
			width: 100
		},
		{
			title: 'Email',
			field: 'email',
			align: 'center',
			width: 180
		},
		{
			title: '电话',
			field: 'tel',
			align: 'center',
			width: 120
		},
		{
			title: '创建日期',
			field: 'createdate',
			align: 'center',
			width: 190
		}
	]
};
var grid = new GridView('xixihaha',layout);

grid.ajax = function(pageNumber, pageSize){ alert(pageNumber+"***********"+pageSize);
	var a ={list:
		 [{
		 	pwd:"e10adc3949ba59abbe56e057f20f883e",
		  	email:"wangdongfang1016@sina.com",
		  	tel:"1863893****",
		  	name:"超级管理员",
		  	createdate:"2013-03-11 09:47:15",
		  	userid:"admin"
		  	}],
		  	pager:{
				pageCount:10,
				pageNumber:4,
				pageSize:10,
				recordCount:98
			} 	
		};
	return a;
};

grid.execute();  

//  var grid = new PageView('xixihaha');
// grid.execute(); 

/* function goSeach(pageNumber){
	pager._goSeach(pageNumber);
}
pager.render(); */
/* pager.onclick = function(pageNumber,pageSize){
	pager.transJsonObj([{
		'pageCount':10,
		'pageNumber':4,
		'pageSize':10,
		'recordCount':98
	}]);
	return true;
}; */
</script>
</html>